package com.itheima.server.controller;

import com.itheima.commons.vo.HuanXinUser;
import com.itheima.server.interceptor.UserHolder;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 阿鹏
 * @date 2021/2/2 19:24
 */

@RestController
@RequestMapping("/huanxin")
public class HuanXinController {

    @GetMapping("/user")
    public ResponseEntity findHuanXinUserInfo() {
        HuanXinUser user = new HuanXinUser();
        user.setUsername(UserHolder.getUserId().toString());
        user.setPassword("123456");
        return ResponseEntity.ok(user);
    }
}
